package com.jemmyee.pizza.service;

import java.io.Serializable;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.criterion.DetachedCriteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.jemmyee.core.dao.Page;
import com.jemmyee.pizza.dao.IApplyFlowDao;
import com.jemmyee.pizza.entity.ApplyFlow;

@Repository("applyFlowService")
public class ApplyFlowServiceImpl implements IApplyFlowService<ApplyFlow>{

	private static final Log log = LogFactory.getLog(ApplyFlowServiceImpl.class);
	
	@Autowired
	private IApplyFlowDao applyFlowDao ;
	
	public void delete(ApplyFlow entity) {
		applyFlowDao.delete(entity);
	}

	public void deleteAll(List<ApplyFlow> list) {
		applyFlowDao.deleteAll(list);
	}

	public void deleteById(Serializable id) {
		applyFlowDao.deleteById(id);
	}

	public List<ApplyFlow> findAll() {
		return applyFlowDao.findAll(new ApplyFlow());
	}

	public List<ApplyFlow> findByCriteria(DetachedCriteria criteria) {
		return applyFlowDao.findByCriteria(criteria);
	}

	public ApplyFlow findById(Serializable id) {
		return applyFlowDao.findById(id);
	}

	public List<ApplyFlow> findByProperty(String propertyName, Object value) {
		return applyFlowDao.findByProperty(new ApplyFlow(), propertyName, value);
	}

	public Page findPageByCriteria(DetachedCriteria detachedCriteria,
			int pageSize, int startIndex,String order) {
		return applyFlowDao.findPageByCriteria(detachedCriteria, pageSize, startIndex, order);
	}

	public void save(ApplyFlow entity) {
		applyFlowDao.save(entity);
	}

	public void update(ApplyFlow entity) {
		applyFlowDao.update(entity);
	}

	public List<ApplyFlow> findByLimit(String[] limits, String orderby) {
		return applyFlowDao.findByLimits(limits, orderby);
	}

}
